using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Audio;
using HappySprite;
using HappySprite.Graphics;

namespace HappyInvaders
{
    class SaucerVisual : Visual
    {
        Cue cue;

        public SaucerVisual()
        {
            Item.RenderItem.Width = Constants.SaucerWidth;
            Item.RenderItem.Height = Constants.SaucerHeight;
            Item.RenderItem.ImageMap = new ImageMap(Constants.SaucerTexture);
        }

        internal override void OnAdd(View view)
        {
            cue = Global.Audio.Play(Constants.SaucerCue);
        }

        internal override void OnRemove()
        {
            Global.Audio.Stop(cue);
        }
    }
}
